﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BVSoftware.MoneyBaby
{
    public class GenericPaymentGatewaySettings: PaymentGatewaySettings
    {
        private Dictionary<string, object> values = new Dictionary<string, object>();

        public bool ContainsValue(string name)
        {
            name = name.ToUpper();
            return values.ContainsKey(name);            
        }

        public void AddOrUpdateValue(string name, object value)
        {
            name = name.ToUpper();
            if (values.ContainsKey(name))
            {
                values[name] = value;
            }
            else
            {
                values.Add(name, value);
            }
        }

        public object GetValue(string name)
        {
            name = name.ToUpper();
            if (values.ContainsKey(name))
            {
                return values[name];
            }
            else
            {
                return null;
            }
        }

        public override void PopulateChildFromGeneric(GenericPaymentGatewaySettings genericSettings)
        {
            throw new NotImplementedException();
        }
    }
}
